<?php
/**
 * 在线订单后台管理栏目修改文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	deal
 */
require_once('../config/config.inc.php');
require_once("../class/deal.class.php");
require_once ('../../useradmin/checklogin.php');

$objWebInit = new deal();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();

// 取得文章信息
$arrInfo = $objWebInit->getInfo(intval($_REQUEST['id']));

//判断是否有权限
if($arrInfo['user_id'] != $_SESSION['user_id']) exit('非法操作，你的IP已经被记录！');

if(!is_array($arrMType)||empty($arrMType)){
	$arrMType = $objWebInit->getTypeList();
	$arrMType = $objWebInit->formatTypeList(0,$arrMType);
}

//========================================
//计算总价格或者总积分
$intBonus = 0;
foreach($arrInfo['product'] as $k=>$v){
	$intBonus = $intBonus + $v['product_price']*$v['product_count'];
}
$arrInfo['intBonus'] = $intBonus;
//========================================

// 输出到模板
$arrMOutput["smarty_assign"]['arrData'] = $arrInfo;
$arrMOutput["smarty_assign"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['adminu_main_dir'].'detail.html';
$objWebInit->output($arrMOutput);
?>